package com.sunshine.common.enums;

import lombok.Getter;

/**
 * 题目类型枚举
 * @version 1.0
 * @Author 夏百友
 * @Date 2025/11/12 19:05
 */
@Getter
public enum SubjectInfoEnum {

    RADIO(1,"单选题"),
    MULTIPLE(2,"多选题"),
    JUDGE(3,"判断题"),
    BRIFE(4,"简答");
    
    private  int code;
    private  String desc;
    
    SubjectInfoEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SubjectInfoEnum getDescByCode(int codeVal){
        for (SubjectInfoEnum value : SubjectInfoEnum.values()) {
            if (value.code == codeVal){
                return value;
            }
        }
        return null;
    }

}
